Skip to content

Keep released dd-openfeature SDKs working with the agent - #12976

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 5 commits into
masterfrom
bbujon/ffe-compat
Oct 26, 2026
Merged

gh-worker-dd-mergequeue-cf854d[bot] merged 5 commits into
masterfrom
bbujon/ffe-compat

Conversation

@PerfectSlayer

@PerfectSlayer PerfectSlayer commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

What Does This Do

Keeps applications using a released dd-openfeature SDK working with this agent:

  • New dd-openfeature-1.56 instrumentation: released providers (1.56 to 1.68) link to the agent bootstrap API the bridge replaced; they now skip their legacy evaluator and return the caller defaults (PROVIDER_NOT_READY) with a warning to upgrade, instead of failing. It applies even with Feature Flags disabled, and is checked by muzzle against every released version.

Motivation

The previous PR removes the agent-coupled provider API (APMLP-1512). Merge right after it: in between, released SDKs fail with this agent.

Additional Notes

Files
File Notes
LegacyProviderInstrumentation, LegacyProviderAdvice Skip initialize() and return defaults from the evaluation methods of legacy providers (matched on loadEvaluatorClass())
ignored_class_name.trie Allows instrumenting datadog.trace.api.openfeature.Provider
:dd-smoke-tests:openfeature-legacy Smoke test: an application built with the released dd-openfeature 1.67.1 gets the caller defaults and the upgrade warning, with Feature Flags enabled or disabled

Stack

The full change is in #12709. It was split into this stack to ease the review.

  1. Resolve Feature Flags enablement from instrumenter config #12845 (merged)
  2. Add dd-openfeature SDK flag configuration and evaluation core #12840 (merged)
  3. Add dd-openfeature SDK settings and configuration delivery #12841 (merged)
  4. Add dd-openfeature SDK exposure and flag evaluation pipelines #12842 (merged)
  5. Add dd-openfeature SDK OpenFeature provider #12843 (merged)
  6. Port master Feature Flags changes to the dd-openfeature SDK #12957 (merged)
  7. Add the agent bridge for the dd-openfeature SDK #12975 (merged)
  8. Connect the dd-openfeature SDK to the agent #12844
  9. Keep released dd-openfeature SDKs working with the agent #12976 👈 this PR
  10. Resolve the Feature Flags settings like the SDK #12977
  11. Restore the agent Feature Flags behaviors through the bridge #12978
  12. Add agentless and standalone OpenFeature smoke tests #12846

Jira ticket: APMLP-1512

🤖 Generated with Claude Code

@datadog-prod-us1-5

This comment has been minimized.

@dd-octo-sts

dd-octo-sts Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

🟢 Java Benchmark SLOs — All performance SLOs passed

Suite Status
Startup 🟢 pass

SLO thresholds are defined here based on automatically generated metrics. A warning is raised when results are within 5% of the threshold.

PR vs. master results
Scenario Candidate master Δ (95% CI of mean)
startup:insecure-bank:iast:Agent 14.01 s 13.99 s [-0.6%; +0.8%] (no difference)
startup:insecure-bank:tracing:Agent 12.94 s 13.06 s [-1.6%; -0.2%] (maybe better)
startup:petclinic:appsec:Agent 17.66 s 17.46 s [+0.3%; +2.0%] (maybe worse)
startup:petclinic:iast:Agent 16.78 s 17.68 s [-9.3%; -0.9%] (maybe better)
startup:petclinic:profiling:Agent 17.15 s 17.23 s [-1.8%; +0.9%] (no difference)
startup:petclinic:sca:Agent 17.70 s 17.46 s [+0.3%; +2.5%] (maybe worse)
startup:petclinic:tracing:Agent 16.75 s 16.71 s [-0.8%; +1.3%] (no difference)

Commit: 80f290fd · CI Pipeline · Benchmarking Platform UI


Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion.

@PerfectSlayer
PerfectSlayer force-pushed the bbujon/ffe-compat branch 2 times, most recently from 17c0f4e to 9b8b55c Compare October 21, 2026 14:19
@PerfectSlayer
PerfectSlayer force-pushed the bbujon/ffe-compat branch 3 times, most recently from 413ffd3 to 4f242cb Compare October 22, 2026 08:40
@PerfectSlayer
PerfectSlayer marked this pull request as ready for review October 22, 2026 08:55
@PerfectSlayer
PerfectSlayer requested review from a team as code owners October 22, 2026 08:55
@PerfectSlayer
PerfectSlayer requested review from jordan-wong and mhdatie and removed request for a team October 22, 2026 08:55
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-22T08:59:13.332710Z 4f242cb Draft marked ready
🔒 Security Review 🔄 Running since 2026-10-22T08:55:32.644855Z 4f242cb Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@datadog-prod-us1-5 datadog-prod-us1-5 Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bits Code Review: PASS

More details

Static review found no actionable compatibility gaps in legacy provider matching, initialization bypass, or default-value evaluation. Runtime behavior remains unverified.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit 4f242cb

@PerfectSlayer
PerfectSlayer requested review from a team and dougqh and removed request for a team and mhdatie October 22, 2026 13:11

@datadog-prod-us1-5 datadog-prod-us1-5 Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bits Code Review: PASS

More details

Static review supports that the legacy-provider fallback avoids loading the removed bootstrap evaluator and returns caller defaults for all five evaluation types, including when Feature Flags is disabled.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit 0b85f6e

@sarahchen6 sarahchen6 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Base automatically changed from bbujon/ffe-agent-connector to master October 26, 2026 14:59

@datadog-prod-us1-5 datadog-prod-us1-5 Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bits Code Review: FAIL

Two critical regressions stand out: the replacement HTTP factory in FeatureFlagsBackend loses both send-once semantics (risking duplicate exposure/evaluation counts on retries) and the DD-EVP-ORIGIN/DD-EVP-ORIGIN-VERSION identity headers (silently dropping SDK attribution). Additionally, a permanent resolved=true flag in EventProxy after a failed Agent discovery prevents any recovery of event pipelines even after the Agent comes back online.

Open Bits AI session

🤖 Bits Code Review · Commit 75cccf3


Findings that could not be posted inline

products/feature-flagging/feature-flagging-lib/src/main/java/com/datadog/featureflag/EventProxy.java:81

P2 Allow event delivery to recover after failed discovery

If initial Agent discovery fails, both clients can be null, yet resolved permanently prevents another attempt. JavaAgentBridge then returns no transport, causing FeatureFlagsRuntime to omit both event pipelines when direct delivery is unavailable. Agent recovery cannot restore reporting, even after provider recreation because the backend retains the cached absence. Keep a recoverable transport and pipelines alive, and re-probe unavailable routes; changing this flag alone is insufficient.

React: 👍 useful · 👎 wrong · 😕 unclear · 👀 right, but not acting on it

What each reaction means
  • 👍 Useful: correct, and you're fixing it or will.
  • 👎 Wrong: the finding is incorrect, for example the bug can't happen or the code was misread.
  • 😕 Unclear: you can't tell what it means or why it matters.
  • 👀 Right, not acting: correct, but intended, out of scope for this PR, a known risk, or too minor.

🤖 Bits Code Review · Open Bits AI session

products/feature-flagging/feature-flagging-lib/src/main/java/com/datadog/featureflag/FeatureFlagsBackend.java:36

P2 Preserve send-once semantics for proxied event batches

If the proxy accepts a batch but its response times out, this factory permits replaying the same exposure or evaluation counts. The two-argument constructor defaults to sendOnce=false, enabling timeout/5xx retries on the no-fallback path and leaving OkHttp automatic retries enabled even with NEVER_RETRY. This regresses the previous transport's send-once safeguards and can inflate event counts. Enable send-once semantics on the factory.

            new BackendApiFactory(config, sco, true),

React: 👍 useful · 👎 wrong · 😕 unclear · 👀 right, but not acting on it

What each reaction means
  • 👍 Useful: correct, and you're fixing it or will.
  • 👎 Wrong: the finding is incorrect, for example the bug can't happen or the code was misread.
  • 😕 Unclear: you can't tell what it means or why it matters.
  • 👀 Right, not acting: correct, but intended, out of scope for this PR, a known risk, or too minor.

🤖 Bits Code Review · Open Bits AI session

products/feature-flagging/feature-flagging-lib/src/main/java/com/datadog/featureflag/FeatureFlagsBackend.java:36

P2 Keep SDK identity headers on proxied Feature Flags events

Every proxied exposure and evaluation batch now uses a factory with empty request headers, and EvpProxyApi does not supply DD-EVP-ORIGIN or DD-EVP-ORIGIN-VERSION itself. The removed factory supplied both, so successful deliveries silently lose SDK identity and version attribution. Restore those headers and the corresponding forwarding-capability check during proxy discovery.

React: 👍 useful · 👎 wrong · 😕 unclear · 👀 right, but not acting on it

What each reaction means
  • 👍 Useful: correct, and you're fixing it or will.
  • 👎 Wrong: the finding is incorrect, for example the bug can't happen or the code was misread.
  • 😕 Unclear: you can't tell what it means or why it matters.
  • 👀 Right, not acting: correct, but intended, out of scope for this PR, a known risk, or too minor.

🤖 Bits Code Review · Open Bits AI session

PerfectSlayer and others added 5 commits October 26, 2026 12:18
Released providers, from 1.56 to 1.68, link to the agent bootstrap API
the bridge replaced: make them return the caller defaults instead of
failing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replace the legacy provider instrumentation tests, which loaded a
released provider in a dedicated class loader, with a smoke test running
an application built with the released dd-openfeature 1.67.1, with and
without Feature Flags enabled. Drop the IDEA module configuration and use
the static VERSION_11 import in the legacy provider instrumentation build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Mark the instrumentation module and advice classes as unused, as they are
only referenced through AutoService and advice class names, and import
the Advice annotations statically.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sarahchen6

Copy link
Copy Markdown
Contributor

Findings that could not be posted inline

Findings will be addressed in subsequent PRs in the stack

@sarahchen6

Copy link
Copy Markdown
Contributor

/merge

@gh-worker-devflow-routing-ef8351

gh-worker-devflow-routing-ef8351 Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-10-26 17:40:46 UTC ℹ️ Start processing command /merge


2026-10-26 17:40:50 UTC ℹ️ MergeQueue: pull request added to the queue

The expected merge time in master is approximately 1h (p90).


2026-10-26 19:02:52 UTC ℹ️ MergeQueue: This merge request was merged

@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot merged commit 95910cf into master Oct 26, 2026
608 checks passed
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot deleted the bbujon/ffe-compat branch October 26, 2026 19:02
@github-actions github-actions Bot added this to the 1.69.0 milestone Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: openfeature OpenFeature tag: ai generated Largely based on code generated by an AI or LLM tag: no release notes Changes to exclude from release notes type: feature Enhancements and improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants